<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('rd_alarm_work_apply', function (Blueprint $table) {
            $table->comment('工单转移申请');
            $table->bigIncrements('id');
            $table->unsignedBigInteger('work_id')->comment('工单ID');
            $table->unsignedBigInteger('user_id')->comment('接收用户ID');
            $table->unsignedTinyInteger('status')->default(0)->comment('状态 1待处理 2同意 3拒绝');
            $table->string('remark', 255)->nullable()->comment('备注');
            $table->string('handle_remark', 255)->nullable()->comment('处理备注');
            $table->authorBy();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('rd_alarm_work_apply');
    }
};